<script>
$(function () {
    $('#pie_chart').highcharts({
        chart: {
            width: 450,
            height: 450,
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: 'Porcentajes de respuestas'
        },
        tooltip: {
    	    pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %'
                }
            }
        },
        
        credits: {
                enabled: false
            },
        series: [{
            type: 'pie',
            name: '% de respuesta',
            data: [
                 <?php echo $series_data_pie1; ?>,
                 <?php echo $series_data_pie2; ?>,
                 <?php echo $series_data_pie3; ?>,
                 <?php echo $series_data_pie4; ?>,
                 <?php echo $series_data_pie5; ?>
            ]
        }]
    });
});
</script>